package com.bkhc.umc.entity;

import com.bkhc.umc.entity.listener.DataEntityListener;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

@Entity
@Data
@Table(name = "tbl_umc_user_address")
@EntityListeners({AuditingEntityListener.class, DataEntityListener.class})
public class Address {
    private static final long serialVersionUID = 1L;
    /**AccountController
     * id
     */
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Id
    private int id ;
    @Column(name = "user_id")
    private String userId;
    //收货人
    @Column(name = "consifnee")
    private String consifnee;
    //手机
    @Column(name = "phone_number")
    private String phoneNumber;
    @Column(name = "province")
    private String province;
    @Column(name = "city")
    private String city;
    @Column(name = "address")
    private String address;
    @Column(name = "default_flag")
    private boolean defaultFlag;

    @Column(name = "creator",updatable = false)
    private String creator;

    @Column(name = "create_date",updatable = false)
    @CreatedDate
    private Date createDate;

    @Column(name = "updator")
    private String updator;
}
